Rotary electric machines capable of rotatably driving, e.g., compression mechanisms have been known. The rotary electric machine of this type includes a rotor attached to a drive shaft and a stator disposed at the outer periphery of the rotor, and rotatably drives the compression mechanism by rotating the drive shaft. In order to resist the centrifugal force of rotation, rotors of rotary electric machines used for electric motors for high-speed rotation employ a press-fitting attachment structure in which a sleeve or a collar is press-fitted into a space between a rotor core and a shaft (see Patent Document 1).